<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html,body {
            height: 100%;
        }
        div.container {
            height: 100%;
            background: #dddddd;
            display: grid;
            grid-template-columns: 100px 100px 100px;
            grid-template-rows: 100px 100px 100px;
            /*grid-template-areas: 'a b c'
                                 'd e f'
                                 'g h i';*/
            /* 上面代码先划分出9个单元格，然后将其定名为a到i的九个区域，分别对应这九个单元格。 */
            grid-template-areas: 'a a a'
                                 'b b b'
                                 'c c c';
            /* 多个单元格合并成一个区域的写法。 分成a、b、c三个区域。*/
        }
        div.item {
            background: #505050;
            border: 1px solid #fff;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>
</html>